<div class="stock-create-title"><span>新建<?php echo $sub_title; ?></span></div>
<div class="stock-basic s-step">
	<div class="edit-name">单号</div>
	<div class="edit-text"><input type="text" value="自动生成" disabled /></div>
	<div class="edit-name">类型</div>
	<div class="edit-select">
		<select name="bound_type_id">
			<option value="">选择类目</option>
			<?php foreach($form['bound_types'] as $bound_type): ?>
			<option value="<?php echo $bound_type['id'] ?>"><?php echo $bound_type['name'] ?></option>
			<?php endforeach ?>
		</select>
	</div>
	<div class="edit-name">负责人</div>
	<div class="edit-text"><input type="text" value="<?php echo $cur_user['realname']; ?>" disabled /></div>
	<div class="edit-name">日期</div>
	<div class="edit-text"><input type="text" class="jDatepicker" name="stock_date" /></div>
	<div class="edit-name">备注</div>
	<div class="edit-textarea">
		<textarea name="description"><?php echo isset($description)?$description:'' ?></textarea>
	</div>
	<div class="edit-submit"><input type="submit" value="下一步" class="step" to-step="2" /></div>
</div>
<div class="stock-detail s-step">
	<div class="stock-create-search" id="search-goods">
		<div class="input"><input type="text" name="s" /></div>
		<div class="result hide">
			<div class="wrapper">
				<div class="clear"></div>
			</div>
		</div>
	</div>
	<div class="stock-create-list">
		<div class="title">
			<div class="goods-number">货号</div>
			<div class="goods-scode">搜索码</div>
			<div class="goods-attr">属性</div>
			<div class="goods-quantity">数量</div>
			<div class="goods-supplier">供应商</div>
			<div class="goods-price">单价</div>
			<div class="store">仓位</div>
			<div class="goods-store goods-transfer">出仓</div>
			<div class="goods-store goods-transfer">入仓</div>
		</div>
		<div class="list">
			<!--
			<div class="each">
				<input type="hidden" name="sub_goods_id[]" value="31321" />
				<input type="hidden" name="supplier[]" value="31321" />
				<div class="goods-number">11201251</div>
				<div class="goods-scode">7012</div>
				<div class="goods-attr">大板湖水蓝</div>
				<div class="goods-quantity"><input type="text" name="quantity[]" value="10" /></div>
				<div class="goods-supplier">苹果</div>
				<div class="goods-price"><input type="text" name="price[]" value="170" /></div>
				<div class="store"><select name="store"><option value="main_store">主仓</option><option value="sub_store">副仓</option></select></div>
			</div>
			-->
		</div>
	</div>
	<div class="edit-submit">
		<input type="submit" value="上一步" class="step" to-step="1" />
		<input type="submit" value="提交" id="finish" />
	</div>
</div>
<div class="form hidden">
	<form name="ready_submit">
		<input type="hidden" name="user_id" value="<?php echo $cur_user['user_id']; ?>" />
		<input type="hidden" name="stock_type" value="<?php echo $form['stock_type'] ?>" />
		<input type="hidden" name="stock_bound_type" value="<?php echo isset($form['stock_bound_type'])?$form['stock_bound_type']:''; ?>" />
		<input type="hidden" name="bound_type_id" value="" />
		<input type="hidden" name="stock_date" value="" />
		<input type="hidden" name="description" value="" />
	</form>
</div>

<script type="text/javascript">
$(function(){
	stock.type = '<?php echo $search_type ?>';
	stock.init();
	$('.step').click(function(){stock.step($(this))});
	//$('input[name=s]').keyup(function(){stock.search($(this).val())});
	$('.option').bind('click', function(){form.select._click($(this))});
})
</script>